package com.jeesite.modules.custom.enumInfo;

import com.jeesite.common.collect.ListUtils;

import java.util.List;

public enum BillStatusEnum {

    ServiceOrder("服务订单","/order/serviceorder/serviceOrder/detail?serviceOrderId="),
    BillNegotiated("到单押汇",
            "/financial/billnegotiated/billNegotiated/detail?billNegotiatedId="),
    TtPaymentOrder("tt付款单",
            "/financial/ttpaymentorder/ttPaymentOrder/detail?ttPaymentOrderId="),
    finServiceOrder001("融资服务订单",
            "/financing/finserviceorder/finServiceOrder/detail?financingServiceOrderId="),
    TaxClearance("通关缴税",""),
    incomeExpend("收支明细",""),
    LetterCredit("信用证",""),//记住要用分号结束
    nullParentBill("空的前置单据",""),
    CarPreSettlement("车辆预结算报表",
            "/settlement/carpresettlement/carPreSettlement/detail?customerSettlementId="),//这个待修改
    //单据重定向时用的
    tar001("应收单","/ar/tar/detail?arId="),
    investorcarcontract001("应付单","/payment/tap/detail?apId="),
    releasecar002("预收单","/prerecieve/tadvancesReceived/detail?advancesReceivedId="),
    inboundorder001("预付单","/prepay/tprepayment/detail?prepaymentId=");
    //以上是枚举的成员，必须先定义，而且使用分号结束
    private String day;
    private String path;
    BillStatusEnum(String day,String path) {
        this.day=day;
        this.path=path;
    }
    /**
     * 定义方法,返回描述,跟常规类的定义没区别
     * @return
     */
    public String getDay(){
        return day;
    }
    public String getPath(){
        return path;
    }
    public Boolean getDays(){
        BillStatusEnum[] values = BillStatusEnum.values();
        List<String> strings= ListUtils.newArrayList();
        for (BillStatusEnum value : values) {
            strings.add(value.name());
        }
        return ListUtils.inString(this.name(),strings);
    }
}
